\frame
{
  \frametitle{Stack-based patterns}
{\small
  Micropatterns where the values on the operand stack are
  significant.  Examples:
  \B
  \item As seen earlier: look for {\tt monitorenter}
        on constant String value
  \E
  Typical implementation strategy:
  \B
  \item Detector class extends
        {\tt OpcodeStackVisitor}, overrides {\tt visit(Method)}
        and {\tt sawOpcode()}
  \item {\tt sawOpcode()} uses the OpcodeStack object
        stored in {\tt stack} field to inquire about
        values on operand stack
  \item Warn when suspicious instruction sequence/stack values seen
  \E
}
}
